package com.aabte.mp.controller;


import com.aabte.mp.bean.Employee;
import com.aabte.mp.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author daniel
 * @since 2019-05-07
 */
@Controller
@RequestMapping("/employee")
public class EmployeeController {

    @Autowired
    private EmployeeService employeeService;

    @ResponseBody
    @GetMapping("/{id}")
    public Employee getEmployee(
            @PathVariable(value = "id") Integer id
    ){
        return employeeService.selectById(id);
    }

}

